Delete some dead code.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 23 Aug 2013 04:19:39 +0000 (04:19 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 23 Aug 2013 04:19:39 +0000 (04:19 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4558 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/util.cc

index cd20a1bdef5a37a996c94dead64d656ae1b0e461..a02b9498d74e0175ac64230460937d234465aaa6 100644 (file)
@@ -174,34 +174,6 @@ xstrndup(const char* str, size_t sz)
   return newstr;
 }
 
-/*
- * Lazily trim whitespace (though not from allocated version)
- * while copying.
- */
-char*
-#ifdef DEBUG_MEM
-XSTRNDUPT(const char* str, size_t sz, DEBUG_PARAMS)
-#else
-xstrndupt(const char* str, size_t sz)
-#endif
-{
-  size_t newlen = 0;
-  char* cin = (char*)str;
-  char* newstr;
-
-  while ((newlen < sz) && (*cin != '\0')) {
-    newlen++;
-    cin++;
-  }
-
-  newstr = (char*) xmalloc(newlen + 1);
-  memcpy(newstr, str, newlen);
-  newstr[newlen] = 0;
-  rtrim(newstr);
-
-  return newstr;
-}
-
 void*
 #ifdef DEBUG_MEM
 XREALLOC(void* p, size_t s, DEBUG_PARAMS)
@@ -1188,21 +1160,6 @@ gstrsub(const char* s, const char* search, const char* replace)
   return o;
 }
 
-/*
- * Like strstr, but starts from back of string.
- */
-const char*
-xstrrstr(const char* s1, const char* s2)
-{
-  const char* r = NULL, *next = NULL;
-
-  while (next = strstr(s1, s2), NULL != next) {
-    r = next;
-    s1 = next + 1;
-  }
-  return r;
-}
-
 /*
  *
  */